﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("Please choose option 1-4");
            int option = int.Parse(Console.ReadLine());
            switch (option)
            {
                case 1:
                    ReadPosiveNumberFromConsole();
                    break;
                case 2:
                    ReadPosNegZerNumberFromConsole();
                    break;
                case 3:
                    ReadNumberFromConsole();
                    break;
                case 4:
                    ReadNumberSquareConsole();
                    break;
            }
            Console.WriteLine("to continue press y");
            string continuation = Console.ReadLine().ToLower();
            while (continuation == "y") ;
        }

        static void ReadPosiveNumberFromConsole()
        {

            for (int i = 10; i < 100; i = i + 1)
            {
                if (i % 5 == 0)
                    Console.WriteLine(i);
            }
        }
        static void ReadPosNegZerNumberFromConsole()
        {
            Console.WriteLine("Enter quantity of numbers");
            int input = int.Parse(Console.ReadLine());
            int i = 0;
            int negative = 0;
            int positive = 0;
            int zero = 0;
            for (i = 0; i < input; i++)
            {
                Console.WriteLine("Enter numbers");
                int number = int.Parse(Console.ReadLine());
                if (number < 0)
                {
                    negative++;
                }
                if (number > 0)
                {
                    positive++;
                }
                if (number > 0)
                {
                    zero++;
                }
            }
            Console.WriteLine("Positive meaning");
            Console.WriteLine(positive);
            Console.WriteLine("negative meaning");
            Console.WriteLine(negative);
            Console.WriteLine("zero meaning");
            Console.WriteLine(zero);
        }


        static void ReadNumberFromConsole()
        {
            Console.WriteLine("Enter numbers");
            int input = int.Parse(Console.ReadLine());
            int x = 0;

            int maxValue = 0;
            int minValue = 9;
            do
            {
                int lastNumber = input % 10;
                input = input / 10;
                x++;
                if (lastNumber > maxValue)
                {
                    maxValue = lastNumber;
                }
                if (lastNumber < minValue)
                {
                    minValue = lastNumber;
                }
            }
            while (input > 0);
            Console.WriteLine("Max number {0}", maxValue);
            Console.WriteLine("Min number {0}", minValue);
            Console.WriteLine("number quantity is {0}", x);

        }

        static void ReadNumberSquareConsole()
        {
            int i = 10;
            int x = 0;
            do
            {
                ++i;
                x = i * i;
                Console.WriteLine(x);
            }
            while (i < 20);
            }
    }
}
